﻿﻿<template>
    <el-card class="form-container">
        <el-form :model="dataForm" ref="dataForm" :rules="dataRule"  @keyup.enter.native="dataFormSubmitHandle()" label-width="90px">
                                                    <el-form-item>
                <el-button @click="cancel">取消</el-button>
                <el-button type="primary"  @click="submit('dataForm')">确定</el-button>
            </el-form-item>
        </el-form>
    </el-card>
</template>

<script>
    import {createRefundOrder} from '@/api/admin/refundOrder'
    export default{
        name: 'add-refundOrder',
        data(){
            return {
                dataForm: {
                                                                                },
                dataRule: {
                                                                                }
            }
        },
        methods:{
            cancel(){
                this.$router.go(-1)
            },
            submit(){
                const set = this.$refs;
                set['dataForm'].validate((valid) => {
                    if (!valid) {
                        return false
                    }
                    createRefundOrder(this.dataForm).then(() => {
                        this.$notify({
                            title: '添加成功',
                            message: '添加成功',
                            type: 'success',
                            duration: 2000,
                            onClose: this.$router.go(-1)
                        })
                    })
                })
            }
        }
    }
</script>

<style>
</style>
